<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Modifica Istanza Hotel</title>
	<link rel="stylesheet" type="text/css" href="../styles/style.css" />
</h:head>
<h:body>
<div id="container">
<div id="box">

<header class="banner">
<span id="titoloPagina"> Inserisci i dati per creare la nuova Istanza </span>
</header>

<div id="externalborder1">
<p:spacer height="40px" />

<div id="externalbordeTab">
<div id="centerBigText">
<div id="infoAgg0">
	<h:panelGrid columns="2" id="istGrid">
	
		 <h:outputLabel>Nome:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.elemento.nome}" />
		 
		 <h:outputLabel>Città:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.elemento.città}" />
		 
		 <h:outputLabel>Descrizione:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.elemento.descrizione}" />
		 
		 <h:outputLabel>Tipologia della stanza:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.elemento.multy}" />
		 
		 <h:outputLabel>Data di arrivo:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.istanza.dataInizio}" >  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>  
		 <h:outputLabel>Data di partenza:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.istanza.dataFine}" >  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>  
		 <h:outputLabel>Prezzo:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.istanza.prezzo}" />
		 <h:outputLabel>Disponibilità:</h:outputLabel>
		 <h:outputText value="#{creaIstanze.istanza.disponibilita}" />
	</h:panelGrid>
	</div>
	</div>
  <h:form id="form">
  <p:spacer height="20px"/>  
     <div id="centerBigText2">
<div id="infoAgg2"> 
<h:panelGrid columns="3" id="colonne2">  
    
     <h:outputLabel>Data di arrivo:</h:outputLabel>          
	<p:calendar value="#{creaIstanze.istanza.dataInizio}" id="popupButtonCal1" showOn="button" pattern="MM/dd/yyyy HH:mm"/> <br/>
      
   
    
    <h:outputLabel>Data di partenza:</h:outputLabel>  
    <p:calendar value="#{creaIstanze.istanza.dataFine}" id="popupButtonCal2" showOn="button" pattern="MM/dd/yyyy HH:mm"/> <br/>
    </h:panelGrid>
    
    
   
  
      
    <p:dialog header="Selected Dates" widgetVar="dialog"   
            showEffect="fade" hideEffect="fade">  
      
        <h:panelGrid id="display" columns="2" cellpadding="5">  
          

            <h:outputText value="Data Arrivo: " />  
            <h:outputText value="#{creaIstanze.istanza.dataInizio}" id="popupDate" placeholder="dd/MM/yyyy">  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>  
              
            <h:outputText value="Data Partenza:  " />  
            <h:outputText value="#{creaIstanze.istanza.dataFine}" id="popupButtonDate" placeholder="dd/MM/yyyy">  
                <f:convertDateTime pattern="dd/MM/yyyy HH:mm" />      
            </h:outputText>  
              
        </h:panelGrid>  
          
    </p:dialog> 
    </div>
    </div>
    <p:spacer height="20px"/>
   <div id="centerBigText3">
   <div id="infoAgg3">
    
    <h:panelGrid columns="3" id="selezionaDatiIstanza" width="382px">
						
	
				<h:outputLabel for="prezzo">Prezzo:</h:outputLabel>
				<p:inputText id="prezzo" value="#{creaIstanze.istanza.prezzo}" placeholder="Prezzo"/>
				<p:message for="prezzo" display="icon"/>
				<h:outputLabel for="disponibilita">Disponibilità:</h:outputLabel>
				<p:inputText id="disponibilita" value="#{creaIstanze.istanza.disponibilita}" placeholder="Disponibilità" />
				<p:message for="disponibilita" display="icon" />
						

			</h:panelGrid>
			</div> 
			</div>
			<p:spacer height="40px"/>
			 	 	<div id="centerbutton">
<h:commandLink id="visualizzalink" action="#{creaIstanze.creaIstanza()}">
<div class="button" id="register">
Conferma Istanza
</div>
</h:commandLink>
</div>
			 <!-- <p:commandButton value="Show Data" update="display" oncomplete="PF('dialog').show()" />  -->
   
      
</h:form> 
	

	
</div>


</div>
</div>	 	
<div id="push">
</div>
</div>

<div id="footer">
<h:button id="homepage" value="Homepage" outcome="index.xhtml"></h:button>
</div>

</h:body>

</html>